<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Agent详情</title>
	<link rel="stylesheet" href="css/xingchao.css">
    <link rel="stylesheet" href="css/jquery.page.css">
	<link rel="stylesheet" href="css/bootstrap-new.css">
	<link rel="stylesheet" href="css/zy.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/layer/layer.js"></script>
    <script type="text/javascript" src="js/jquery.page.js"></script>
</head>
<body style="background: #EFEFEF;">

<!--  
	头部
-->
<div class="head">
	<div class="w" style="height:50px;">
		<a href="index.html">
			<img src="images/logo.png" alt="" width="150px;">
		</a>
		<ul class="nav r">
	       <li class="cur">
	            <a href="index.html">众源</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="ziyuan.html">资源搜索</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li>
	            <a href="jiaocheng.html">使用教程</a>
	            <sub class="sub1"></sub>
	        </li>
	        <!--
            <li>
                <a href="biaozhun.html" data-localize='top.API'>领域图谱</a>
                <sub class="sub1"></sub>
            </li>
            -->
	        <li>
	            <a href="page.html">关于我们</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li id='userbox'>
	            <a href="user.html" id="user-box">会员中心</a>|<a href="user.html?action=out">退出</a>
	            <sub class="sub1"></sub>
	        </li>
	        <li id="langBox">
                <a href="javascript:void(0)" data-lang='zh-CN'>中</a>&nbsp;|
                <a href="javascript:void(0)" data-lang="en-US">EN</a>
                <sub class="sub1"></sub>
            </li>
		</ul>
	</div>
</div>

<div class="main w" style="margin-top: 50px">
	<div class="container" style="display:none">
		<div class="row">
		   <div class="col-md-6 col-md-offset-3" style="background-color:#ddd;">
			<h3><b>创建订单</b></h3><br/>
			<dl class="dl-horizontal">
			  <dt>订单id:</dt>
			  <dd id="orderId"></dd><br/>
			  <dt>数据id:</dt>
			  <dd id="dataKey"></dd><br/>
			  <dt>数据支付方式:</dt>
			  <dd id="priceType"></dd><br/>
			  <dt>价格:</dt>
			  <dd id="price"></dd><br/>
			</dl>
			<button type="button" class="btn btn-success center-block" style="margin-bottom: 30px" id="payBtn">立即支付</button>
		   </div>
		</div>
	</div>
</div>
<!--  
	底部
-->
<div class="copyright">
	Copyright @ 2016-2017 语义(上海)信息科技有限公司 &nbsp;&nbsp;&nbsp;&nbsp;技术支持：星巢网络
</div>

</body>
</html>
<script type="text/javascript" src="js/App.min.js"></script>
<script type="text/javascript">
function payNow(orderId,price){
	$.ajax({
		url:"api/payByZyCoin",
		type:'GET',
		xhrFields: {
			withCredentials: true
		},
		crossDomain:true,
		data:{"price":price,"orderId":orderId},
		success:function(data){
			if(data.code == 1003){
				layer.open({
					content: "您尚未登录"
					,btn: ['确认']
					,yes: function(index, layero){
						location.href="login.html";
					}
				});
			}else if(data.code == 1002){
				layer.msg('参数不全!',{icon:2});
			}else if(data.code == 1014){
				layer.msg('价格字段错误!',{icon:2});
			}else if(data.code == 1013){
				layer.msg('该订单不存在!',{icon:2});
			}else if(data.code == 1015){
				layer.msg('订单状态无效',{icon:2});
			}else if(data.code == 1012){
				layer.open({
					content: "余额不足,请先充值!"
					,btn: ['确认']
					,yes: function(index, layero){
						location.href="bill.html";
					}
				});
			}else if(data.code == 200){
				layer.open({
					content: "支付成功"
					,btn: ['确认']
					,yes: function(index, layero){
						self.location=document.referrer;
					}
				});
			}else{
				layer.msg('服务异常,请稍后重试',{icon:2});
			}
		},
		error:function(error){
			console.log(error);
			layer.msg('服务异常,请稍后重试',{icon:2});
		},dataType:'json'});
}
</script>